package com.altaic.structure ;

import java.util.ArrayList ;

import com.altaic.samples.SamplesSimple ;
import com.altaic.structure.verbs.JapaneseVerbUtils ;

public class JapaneseSentence extends AltaicSentence
{
    public String createRender( )
    {
        String res = "" ;

        if( this.subject != null )
        {
            res += this.subject.createRender( ) ;
        }

        res += " " + PrepositionUtils.getSubjectIdentifier( this.subject ) + " " ;

        for( AltaicNoun object : this.objects )
        {
            res += object.createRender( ) + " " ;
        }

        res += " " + this.verb.createRender( ) ;

        return res ;
    }

    public static void main( String[ ] args )
    {
        ArrayList<JapaneseSentence> sentences = new ArrayList<JapaneseSentence>( ) ;
        
        sentences.add( SamplesSimple.sampleProbablityWithTarget(JapaneseVerbUtils.TARGET_TE_CONTINOUS_IMASU ,JapaneseVerbUtils.TIME_PRESENT_CONTINUOUS ) ) ;
        
        sentences.add( SamplesSimple.sampleProbablity1( ) ) ;
        sentences.add( SamplesSimple.sampleProbablity2( ) ) ;
        sentences.add( SamplesSimple.sampleAbility( ) ) ;
        sentences.add( SamplesSimple.sampleProbablityWithTarget(JapaneseVerbUtils.TARGET_SIMPLE_PRESENT ,JapaneseVerbUtils.TIME_SIMPLE_PRESENT ) ) ;
        sentences.add( SamplesSimple.sampleProbablityWithTarget(JapaneseVerbUtils.TARGET_SIMPLE_PAST ,JapaneseVerbUtils.TIME_PAST ) ) ;
        sentences.add( SamplesSimple.sampleProbablityWithTarget(JapaneseVerbUtils.TARGET_PRESENT_CONTINIOUS ,JapaneseVerbUtils.TIME_PRESENT_CONTINUOUS ) ) ;
        
        for( String target : JapaneseVerbUtils.TARGETS ) 
            sentences.add( SamplesSimple.sampleProbablityWithTarget(target ,JapaneseVerbUtils.TIME_PAST ) ) ;
        
        for( JapaneseSentence sentence :sentences )
        {
            String rendered = sentence.createRender( ) ;
            System.err.println( rendered ) ;
        }


    }
}
